// import http from "../../modules/http";
/**
 * 获取直播室ID
 * @param {Object} params
 * @param {Number} params.productId - 用户ID
 * @param {Number, Optional} params.limit - 请求条数
 * @param {Number, Optional} params.cId - 栏目id
 *
 * @return {Promise} Array
 */
export const queryByRoomid = async params => {
  const url = "/client/queryByRoomid.htm";
  const res = await http.get(url, { params });
  return res;
};

/**
 * 获取直播内容信息
 * @param {Object} option
 * @param {Number} option.currentPage - 页码
 * @param {Number} option.pageSize - 每页条数
 * @param {Number} option.roomid - 直播室ID
 * @param {String} option.clientCentralToken -token
 * @return {Promise} Array
 */
export async function broadcastingList(option) {
  const url = "/client/broadcastingList.htm";
  const def = {
    currentPage: 1,
    pageSize: 20,
    roomid: "",
    clientCentralToken: "",
    ...option
  };
  const params = Object.assign(def, option);
  const res = await http.get(url, { params });
  return res.data;
}

/**
 * 获取首页直播预告
 * @param {Object} option
 * @param {String} option.productId: 产品ID
 * @return {Promise} Array
 */
export const queryShowYeMarketChargeLiveList = async params => {
  const url = "/client/queryShowYeMarketChargeLiveList.htm";
  const res = await http.get(url, { params });
  return res;
};

/**
 * 获取玉龙版高级股池栏目
 * @return {Promise} Array
 */
export const showStrategyStockPoolColumn = async () => {
  const url = "/client/showStrategyStockPoolColumn.htm";
  const res = await http.get(url);
  return res;
};

/**
 * 获取策略股票池列表
 * @param {Object} params
 * @param {String} params.productId 产品ID
 * @param {Number} params.limit 条数
 * @param {Number} params.cId 栏目ID
 *
 */
export const getStrategyStockPoolList = async params => {
  const url = "/client/getStrategyStockPoolList.htm";
  const res = await http.get(url, { params });
  return res;
};
